//
//  zhaoshangTableViewCell.m
//  gangquOASystem
//
//  Created by michael on 2018/7/30.
//  Copyright © 2018年 czd. All rights reserved.
//

#import "zhaoshangTableViewCell.h"

@implementation zhaoshangTableViewCell
- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
if (self) {

    self.selectionStyle = UITableViewCellSelectionStyleNone;
    self.bgView  = [[UIView alloc]init];
    
    _label = [[UILabel alloc]init];
_label.frame = CGRectZero;
  _label.textColor = [UIColor colorWithHexString:@"484848"];
_label.text = @"外出日期";
    _label.font = [UIFont systemFontOfSize:14];
[self.bgView addSubview:_label];
_label0 = [[UILabel alloc]init];
_label0.frame = CGRectZero;
  _label0.textColor = [UIColor colorWithHexString:@"484848"];
_label0.text = @"地点";
    _label0.font = [UIFont systemFontOfSize:14];
[self.bgView addSubview:_label0];
_label1 = [[UILabel alloc]init];
_label1.frame = CGRectZero;
  _label1.textColor = [UIColor colorWithHexString:@"484848"];
_label1.text = @"拜访单位(公司)";
    _label1.font = [UIFont systemFontOfSize:14];
[self.bgView addSubview:_label1];
_label2 = [[UILabel alloc]init];
_label2.frame = CGRectZero;
  _label2.textColor = [UIColor colorWithHexString:@"484848"];
_label2.text = @"拜访人员";
    _label2.font = [UIFont systemFontOfSize:14];

[self.bgView addSubview:_label2];

_label3 = [[UILabel alloc]init];
_label3.frame = CGRectZero;
  _label3.textColor = [UIColor colorWithHexString:@"484848"];
_label3.text = @"职务";
    _label3.font = [UIFont systemFontOfSize:14];

[self.bgView addSubview:_label3];

_label4 = [[UILabel alloc]init];
_label4.frame = CGRectZero;
  _label4.textColor = [UIColor colorWithHexString:@"484848"];
_label4.text = @"接洽内容";
    _label4.font = [UIFont systemFontOfSize:14];

[self.bgView addSubview:_label4];
_button = [zhucebutton buttonWithType:UIButtonTypeCustom];

    [_button setTitle:@"选择时间" forState:UIControlStateNormal];
    [self.bgView addSubview:_button];
 _textfield0= [[zhucetextfield alloc]init];
    _textfield0.delegate = self;
    [self.bgView addSubview:_textfield0];
     _textfield1= [[zhucetextfield alloc]init];
    _textfield1.delegate = self;
    [self.bgView addSubview:_textfield1];

 _textfield2= [[zhucetextfield alloc]init];
    _textfield2.delegate = self;
    [self.bgView addSubview:_textfield2];
    
     _textfield3= [[zhucetextfield alloc]init];
    _textfield3.delegate = self;
    [self.bgView addSubview:_textfield3];
    
         _textfield4= [[zhucetextfield alloc]init];
    _textfield4.delegate = self;
    [self.bgView addSubview:_textfield4];
}
    self.selectionStyle = UITableViewCellSelectionStyleNone;

return self;

}
- (void)setSeltag:(NSInteger)seltag{
_seltag = seltag;
_textfield0.tag = 100+_seltag;
_textfield1.tag = 200+_seltag;
_textfield2.tag = 300+_seltag;
_textfield3.tag = 400+_seltag;
_textfield4.tag = 500+_seltag;

         _button.tag = _seltag;


}
- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}
- (void)layoutSubviews{
[super layoutSubviews];
self.bgView.frame =  CGRectMake(10, 5, KScreenWidth - 20,360+10);
  self.bgView.backgroundColor = [UIColor whiteColor];
    //给bgView边框设置阴影
//    self.bgView.layer.shadowOffset = CGSizeMake(1,1);
//    self.bgView.layer.shadowOpacity = 0.3;
        self. bgView.layer.borderWidth = 1;

      self.  bgView.layer.borderColor = [[UIColor colorWithHexString:@"aeaeae"] CGColor];
        self.bgView.layer.cornerRadius = 5;

    [self.contentView addSubview:self.bgView];
_label.frame =  CGRectMake(10, 0,self.bgView.width-20, 20);
_button.frame =  CGRectMake(10, _label.bottom,self.bgView.width-20, 40);
_label0.frame =  CGRectMake(10, _button.bottom,self.bgView.width-20, 20);
_textfield0.frame =  CGRectMake(10, _label0.bottom,self.bgView.width-20, 40);
_label1.frame =  CGRectMake(10, _textfield0.bottom,self.bgView.width-20, 20);
_textfield1.frame =  CGRectMake(10, _label1.bottom,self.bgView.width-20, 40);
_label2.frame =  CGRectMake(10, _textfield1.bottom,self.bgView.width-20, 20);
_textfield2.frame =  CGRectMake(10, _label2.bottom,self.bgView.width-20, 40);
_label3.frame =  CGRectMake(10, _textfield2.bottom,self.bgView.width-20, 20);
_textfield3.frame =  CGRectMake(10, _label3.bottom,self.bgView.width-20, 40);
_label4.frame =  CGRectMake(10, _textfield3.bottom,self.bgView.width-20, 20);
_textfield4.frame =  CGRectMake(10, _label4.bottom,self.bgView.width-20, 40);
}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
